package ru.study.jdbc.entity;

import ru.study.jdbc.dao.*;

public class EntityManager {
	public static Student getStudent(Long id) {
		return DaoManager.getDao().get(Student.class,id);				
	}	
	
	public static Student saveStudent(Student student) {
		return DaoManager.getDao().update(student);				
	}
	
	public static Student deleteStudent(Student student) {
		return DaoManager.getDao().delete(student);				
	}
	
	public static Student addStudent(Student st) {
		return (Student) DaoManager.getDao().insert(st);	
	}
	
}
